package cn.goldcup.jboot.controller;


import cn.goldcup.jboot.model.User;
import cn.goldcup.jboot.service.UserService;
import io.jboot.components.rpc.annotation.RPCInject;
import io.jboot.web.controller.JbootController;
import io.jboot.web.controller.annotation.RequestMapping;


@RequestMapping(value = "/user", viewPath = "/user")
public class UserController extends JbootController {
    @RPCInject
    UserService userService;

    public void checkLogin(String userName, String password) {
        User user = userService.checkLoginUser(userName, password);
        if (null == user) {
            renderText("用户名或密码错误！");
        } else {
            renderText("登录成功！");
        }
    }
}
